package com.example.androidmainshixun.view;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.androidmainshixun.R;

public class Releasegoods extends AppCompatActivity {
    private static final int SELECT_ADDRESS_REQUEST_CODE = 1; // 请求码常量
    private ImageView mImage;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.release_goods);
        mImage = findViewById(R.id.image);

        // 获取 Spinner 实例
        @SuppressLint({"MissingInflatedId", "LocalSuppress"})
        Spinner spinnerRegion = findViewById(R.id.address);

        // 设置 Spinner 的适配器
        @SuppressLint("ResourceType")
        ArrayAdapter<String> adapterRegion = new ArrayAdapter<>(this,
                android.R.layout.simple_spinner_item, getResources().getStringArray(R.array.regions));
        spinnerRegion.setAdapter(adapterRegion);

        adapterRegion.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);




        mImage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });


    }
}